home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6948 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news.deltanet.com!usenet
  2. From: Robert Taylor <btaylor@deltanet.com>
  3. Newsgroups: comp.lang.basic.visual.misc,comp.lang.c,comp.lang.c++
  4. Subject: Re: DLL, VB and Borland C/C++
  5. Date: Tue, 20 Feb 1996 22:26:09 -0800
  6. Organization: Delta Internet Services, Anaheim, CA
  7. Message-ID: <312ABB01.60D@deltanet.com>
  8. References: <312A0334.AC5@supaero.fr>
  9. NNTP-Posting-Host: ana4023.deltanet.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (Win95; I)
  14.  
  15. Sylvain Souche wrote:
  16. > Hi,
  17. > I am trying desperatly to call a DLL created with Borland C/C++ 4.5 in a
  18. > VB 3.0 application, but VB always complains about a so called "Bad
  19. > Calling Convention Error". This Error message is not very documented,
  20. > and Borland Help files are worth nothing, so...
  21. > If anyone know about this problem, could you tell me.
  22. > Thanks for e-mail replies
  23. > --
  24. >         Sylvain Souche
  25. >         Sylvain.Souche@supaero.fr
  26.  
  27. You are probably not exporting the function correctly in the Borland C++ 
  28. DLL.  I am pretty sure that VB 3.0 requires imported functions to be 
  29. 'FAR PASCAL'.  
  30.  
  31. If you are not declaring the function as FAR PASCAL, it will default to 
  32. 'CDECL'; which will cause the above mentioned error...
  33.  
  34. -- Bob T.
  35.